<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input name="btn" type="button" value="计算两数运算结果" onclick="account();" />
		<script type="text/javascript">
		    function account()
		    {
		        var op1=prompt("请输入第一个数：","");
		        var op2=prompt("请输入第二个数：","");
		        var sign=prompt("请输入运算符号","")
		        var result;
		        opp1=parseFloat(op1);
		        opp2=parseFloat(op2);
				var result=eval("opp1+opp2")
				var result=eval("opp1-opp2")
				var result=eval("opp1*opp2")
				var result=eval("opp1/opp2")
		        alert("两数运算结果为："+op1+sign+op2+"="+result);
		    }
		</script>
	</body>
</html>
